package com.enjoyireland.hiking;

import org.osmdroid.ResourceProxy;
import org.osmdroid.tileprovider.tilesource.OnlineTileSourceBase;
import org.osmdroid.tileprovider.tilesource.XYTileSource;


/**
 * Constants Interface
 * 
 * @author Rónan Mac an tSaoir
 *
 */
public interface Constants {
	
	/* OpenStreetMap Constants */
	public static final String PREFS_NAME = "org.andnav.osm.prefs";
	public static final String PREFS_TILE_SOURCE = "tilesource";
	public static final String PREFS_SCROLL_X = "scrollX";
	public static final String PREFS_SCROLL_Y = "scrollY";
	public static final String PREFS_ZOOM_LEVEL = "zoomLevel";
	public static final String PREFS_SHOW_LOCATION = "showLocation";
	public static final String PREFS_SHOW_COMPASS = "showCompass";
	
	/* open cycle map */
	/** online topological map source */
    final OnlineTileSourceBase CYCLEMAP = new XYTileSource("CycleMap",
		ResourceProxy.string.cyclemap, 13, 14, 384, ".png",
		"http://a.tile.opencyclemap.org/cycle/",
		"http://b.tile.opencyclemap.org/cycle/",
		"http://c.tile.opencyclemap.org/cycle/");
	
	/* DB constants */
    public static final String DB_PATH = "/data/data/com.enjoyireland.hiking/databases/";
	public static final String CREATE_DB = "Creating Walks DB: ";
	public static final String DB_NAME = "walks.sqlite";
	public static final String OPEN_DB = "Opening Walks DB: ";
	public static final String TABLE_NAME = "walks";

	/* DB columns */
	public static final String ID = "_id";
	public static final String COL_NAME = "name";
	public static final String COL_DIFF = "diff";
	public static final String COL_LEN = "dist";
	public static final String COL_GRID = "gridref";
	public static final String COL_CO = "co";
	public static final String COL_DESC = "desc";
	public static final String COL_EQUIP = "equip";
	public static final String COL_TERRAIN = "terrain";
	public static final String COL_GPX = "gpx";
	public static final String COL_VIEWED = "comp";
	public static final int COL_NAME_INDEX = 0;
	public static final int COL_LEN_INDEX = 1;
	public static final int COL_GRID_INDEX = 2;
	public static final int COL_DIFF_INDEX = 3;
	public static final int COL_ID_INDEX = 4;
	public static final int COL_DESC_INDEX = 5;
	public static final int COL_EQUIP_INDEX = 6;
	public static final int COL_TERRAIN_INDEX = 7;
	public static final int COL_CO_INDEX = 8;
	public static final int COL_GPX_INDEX = 9;
	
	/* query constants */
	public static final String[] FROM_DETAILS = {"name","dist","gridref","diff","_id","desc","equip","terrain","co"};
	public static final String[] FROM = {"name","_id","diff","dist"};
	public static final String WHERE = "type='table'";
	public static final String SORT_BY_NAME = "name";
	public static final String SORT_BY_DIFF = "diff";
	
	/* other constants */
	public static final int MENU_ABOUT = 0;
	public static final int MENU_SORT_DIFF = 0;
	public static final int ABOUT_DIALOG = 0;
    public static final int INSTRUCTIONS = 1;
}
